3.1006 \(\int \frac{\cos (c+d x) (A+B \sin (c+d x))}{a+a \sin (c+d x)} \, dx\)

Optimal. Leaf size=36 \[ \frac{(A-B) \log (\sin (c+d x)+1)}{a d}+\frac{B \sin (c+d x)}{a d} \]

[Out]

((A - B)*Log[1 + Sin[c + d*x]])/(a*d) + (B*Sin[c + d*x])/(a*d)

________________________________________________________________________________________

Rubi [A]  time = 0.0817913, antiderivative size = 36, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 29, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.069, Rules used = {2833, 43} \[ \frac{(A-B) \log (\sin (c+d x)+1)}{a d}+\frac{B \sin (c+d x)}{a d} \]

Antiderivative was successfully verified.

[In]

Int[(Cos[c + d*x]*(A + B*Sin[c + d*x]))/(a + a*Sin[c + d*x]),x]

[Out]

((A - B)*Log[1 + Sin[c + d*x]])/(a*d) + (B*Sin[c + d*x])/(a*d)

Rule 2833

Int[cos[(e_.) + (f_.)*(x_)]*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)
])^(n_.), x_Symbol] :> Dist[1/(b*f), Subst[Int[(a + x)^m*(c + (d*x)/b)^n, x], x, b*Sin[e + f*x]], x] /; FreeQ[
{a, b, c, d, e, f, m, n}, x]

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rubi steps

\begin{align*} \int \frac{\cos (c+d x) (A+B \sin (c+d x))}{a+a \sin (c+d x)} \, dx &=\frac{\operatorname{Subst}\left (\int \frac{A+\frac{B x}{a}}{a+x} \, dx,x,a \sin (c+d x)\right )}{a d}\\ &=\frac{\operatorname{Subst}\left (\int \left (\frac{B}{a}+\frac{A-B}{a+x}\right ) \, dx,x,a \sin (c+d x)\right )}{a d}\\ &=\frac{(A-B) \log (1+\sin (c+d x))}{a d}+\frac{B \sin (c+d x)}{a d}\\ \end{align*}

Mathematica [A]  time = 0.0316451, size = 31, normalized size = 0.86 \[ \frac{(A-B) \log (\sin (c+d x)+1)+B \sin (c+d x)}{a d} \]

Antiderivative was successfully verified.

[In]

Integrate[(Cos[c + d*x]*(A + B*Sin[c + d*x]))/(a + a*Sin[c + d*x]),x]

[Out]

((A - B)*Log[1 + Sin[c + d*x]] + B*Sin[c + d*x])/(a*d)

________________________________________________________________________________________

Maple [A]  time = 0.032, size = 51, normalized size = 1.4 \begin{align*}{\frac{\ln \left ( 1+\sin \left ( dx+c \right ) \right ) A}{da}}-{\frac{\ln \left ( 1+\sin \left ( dx+c \right ) \right ) B}{da}}+{\frac{B\sin \left ( dx+c \right ) }{da}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)*(A+B*sin(d*x+c))/(a+a*sin(d*x+c)),x)

[Out]

1/d/a*ln(1+sin(d*x+c))*A-1/d/a*ln(1+sin(d*x+c))*B+B*sin(d*x+c)/d/a

________________________________________________________________________________________

Maxima [A]  time = 1.06111, size = 46, normalized size = 1.28 \begin{align*} \frac{\frac{{\left (A - B\right )} \log \left (\sin \left (d x + c\right ) + 1\right )}{a} + \frac{B \sin \left (d x + c\right )}{a}}{d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)*(A+B*sin(d*x+c))/(a+a*sin(d*x+c)),x, algorithm="maxima")

[Out]

((A - B)*log(sin(d*x + c) + 1)/a + B*sin(d*x + c)/a)/d

________________________________________________________________________________________

Fricas [A]  time = 1.79853, size = 76, normalized size = 2.11 \begin{align*} \frac{{\left (A - B\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) + B \sin \left (d x + c\right )}{a d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)*(A+B*sin(d*x+c))/(a+a*sin(d*x+c)),x, algorithm="fricas")

[Out]

((A - B)*log(sin(d*x + c) + 1) + B*sin(d*x + c))/(a*d)

________________________________________________________________________________________

Sympy [A]  time = 0.677483, size = 60, normalized size = 1.67 \begin{align*} \begin{cases} \frac{A \log{\left (\sin{\left (c + d x \right )} + 1 \right )}}{a d} - \frac{B \log{\left (\sin{\left (c + d x \right )} + 1 \right )}}{a d} + \frac{B \sin{\left (c + d x \right )}}{a d} & \text{for}\: d \neq 0 \\\frac{x \left (A + B \sin{\left (c \right )}\right ) \cos{\left (c \right )}}{a \sin{\left (c \right )} + a} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)*(A+B*sin(d*x+c))/(a+a*sin(d*x+c)),x)

[Out]

Piecewise((A*log(sin(c + d*x) + 1)/(a*d) - B*log(sin(c + d*x) + 1)/(a*d) + B*sin(c + d*x)/(a*d), Ne(d, 0)), (x
*(A + B*sin(c))*cos(c)/(a*sin(c) + a), True))

________________________________________________________________________________________

Giac [A]  time = 1.35858, size = 47, normalized size = 1.31 \begin{align*} \frac{\frac{{\left (A - B\right )} \log \left ({\left | \sin \left (d x + c\right ) + 1 \right |}\right )}{a} + \frac{B \sin \left (d x + c\right )}{a}}{d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)*(A+B*sin(d*x+c))/(a+a*sin(d*x+c)),x, algorithm="giac")

[Out]

((A - B)*log(abs(sin(d*x + c) + 1))/a + B*sin(d*x + c)/a)/d